package com.etc.ssm.entity;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Map;

//两个注解搭配使用 @Component =>bean =>注入
@Component
@ConfigurationProperties(prefix = "zhaboy")
public class ZhaBoy {
    private String name;
    private int age;
    private Map girls;

    @Override
    public String toString() {
        return "ZhaBoy{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", girls=" + girls +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Map getGirls() {
        return girls;
    }

    public void setGirls(Map girls) {
        this.girls = girls;
    }
}
